<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>三列布局</title>
</head>
<style>
  .box{
    height: 600px;
  }
  #left{
    width: 200px;
    background: rgb(149, 46, 46);
    float: left;
  }

  #right{
    width: 200px;
    background: rgb(149, 46, 46);
    float: right;
  }

  /* 方法一:clac是一种计算方式，前后都要加上单位*/
  /* #center{
    background: #000;
    margin-left: 20px;
    float: left;
    width: calc(100% - 440px);
  } */

  /* 方法二:注意把下方div标签的left与right互换顺序！！！！*/
  #center{
    background: #000;
    margin-left: 220px;
    margin-right: 220px;
  }


</style>
<body>
  <div class="box" id="left"></div>
  <div class="box" id="right"></div>
  <div class="box" id="center"></div>
  
</body>
</html>